import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:imove/pages/main_tab.dart';

void main() {
  runApp(MyApp());
}

class AppInfo{
  static GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
  static BuildContext get context => navigatorKey.currentState.overlay.context;
  static BuildContext materialContext;
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
    return MaterialApp(
      title: 'Flutter Demo',
      navigatorKey: AppInfo.navigatorKey,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: FirstPage(),
    );
  }
}

class FirstPage extends StatelessWidget {
  const FirstPage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    AppInfo.materialContext = context;
    return MainTabBar();
  }
}

